/**
 * @Author:卿雨欣
 * @Date:2020/7/8
 * @Description:这是产品买入结果页
 */
import React,{Component} from "react";
import {NavBar, Icon, Result,WhiteSpace,List,Steps,WingBlank} from 'antd-mobile';
let date = new Date();
const Item = List.Item;
const Step = Steps.Step;
export default  class BuyResult extends Component{
    constructor(props) {
        super(props);
        var data = this.props.location.query;
        this.state={
            data:data,
        }
        console.log(data);
    }
    render() {
        return(
            <div>
                <div style={{position:"fixed",zIndex:999,top:0,left:0,width:"110%"}}>
                    <NavBar
                        mode="light"
                        icon={<Icon type="cross" style={{color:" #f8a83f"}}/>}
                        onLeftClick={() => window.history.back(-1)}
                    >交易结果</NavBar>
                </div>
                <WhiteSpace size="lg"/>
                <WhiteSpace size="lg"/>
                <WhiteSpace size="lg"/>
                <WhiteSpace/>
                <Result
                    img= {<img src={require("../../../access/images/success.png")} style={{width:100,height:100,textAlign:"center",marginLeft:-10,marginTop:-30,marginBottom:200}}/>}
                    title="申请受理成功"
                    message={<div>{this.state.data.createTime}</div>}
                />
                <WhiteSpace />
                <WingBlank>
                    <Steps size="small"  current={0}>
                        <Step  status="process" title={this.state.data.confirmShareTime} description="申购份额确认" />
                        <Step status="process" title={this.state.data.viewEarningsTime} description="查看盈亏" />
                    </Steps>
                </WingBlank>
                <WhiteSpace/>
                <div style={{ display: '', alignItems: 'center', justifyContent: 'center', height: '450px', backgroundColor: '#fff' }}>
                    <List  className="my-list">
                        <Item data-seed="logId">
                            <span className="my-list-i" >交易</span>
                            <div className="my-list-i2"  >{this.state.data.tradeType}</div>
                        </Item>
                        <Item  wrap>
                            <div className="my-list-i" style={{width:"23%"}}>账户名称</div>
                            <div className="my-list-i2" >{this.state.data.comBaseName}</div>
                        </Item>
                        <Item  wrap>
                            <span className="my-list-i" >金额</span>
                            <div className="my-list-i2" >
                                <span style={{color:"red"}}>{this.state.data.tradeAmount}</span>
                                <span>元</span>
                            </div>
                        </Item>
                    </List>
                </div>
            </div>
        )
    }
}
